import request from "@/utils/request";

// 获取素材信息列表,分页
export function getMaterialList(data) {
  return request({
    url: "/Material/list",
    method: "get",
    params: data,
  });
}

// 获取详细数据
export function getMaterialById(data) {
  return request({
    url: "/Material/ " + data,
    method: "get",
  });
}

// 添加素材信息数据
export function addMaterial(data) {
  return request({
    url: "/Material",
    method: "post",
    data: data,
  });
}

// 修改素材信息数据
export function updateMaterial(data) {
  return request({
    url: "/Material/update",
    method: "put",
    data: data,
  });
}

// 删除素材信息数据 (单个删除)
export function deleteMaterial(data) {
  return request({
    url: "/Material/" + data,
    method: "delete",
  });
}

// 批量删除素材信息数据
export function deleteMaterialBatch(data) {
  return request({
    url: "/Material/batch",
    method: "delete",
    data: data,
  });
}
